boolean displayed = false;

int x=200;
int y=100;

void setup() {
background(185);
size(500, 500);
noSmooth();
}

void draw() {
  if(keyPressed){
    if(keyCode == RIGHT){
      x++;
    }
  }
   
  ellipse(x,y, 20,40);
  
  
strokeWeight(2);
fill( 0, 74, 150);
rect(190, 200, 100, 100);

fill(0,74,150);
triangle(60, 200, 190, 200, 190, 300);

fill(0, 74, 150);
triangle(320, 200, 450, 200, 320, 300);

fill(0, 50, 100);
rect( 290, 70, 30, 230);

fill( 260, 204, 0);
triangle( 290, 70, 290,40, 320, 70);

fill(260, 204, 0);
triangle(320, 70, 380, 150, 320, 150);
}
void mouseClicked(){
  background(102);
  if(!displayed){
     fill(261,105,0);
    rect(mouseX,mouseY,30, 60);
    displayed = true;
  }else{
    displayed = false;
  }
}
void mouseMoved(){
    if(displayed){
      background(102);
       fill(261,105,0);
      rect(mouseX,mouseY,30, 60);
    }
}
void keyTyped(){
  println("key="+key);
}
